const express = require('express')
const adminRouter = express.Router()

adminRouter.post('/logout', (req, res) => {
  req.session.destroy()
  res.send({ status: '200', msg: '退出成功' })
})

adminRouter.get('/userinfo', (req, res) => {
  console.log('userinfo:', req.user)
  res.send({ status: '200', data: req.user })
})

module.exports = adminRouter
